package fctuc.dei.myTwitter.IO;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public abstract class MyTwitterIO {

	public static void writeToFile(String strPath, byte[] Buffer) throws IOException, FileNotFoundException{
		
		//use buffering
		OutputStream file = new FileOutputStream( strPath );
		file.write(Buffer);
		file.flush();
		file.close();
	}
	
	
	public static byte[] readFromFile(String strPath) throws IOException, FileNotFoundException{
		byte[] output = null;
		InputStream file = new FileInputStream(strPath);
		file.read(output);
		return output;
	}
}